package daily.kou2022_0108;

public class Num204 {
    //204.计数质数
    public static boolean Primes(int num){
        if(num<=1)return false;
        for (int i = 2; i <=num-1 ; i++) {
            if(num%i==0)return false;

        }
        return true;
    }
    public static int countPrimes(int n) {
        int count=0;
        for (int i = 0; i <= n-1; i++) {
            if(Primes(i))count++;

        }
        return count;
    }
}
